<div id="buttons">
	<input type="hidden" value="${_buttons}" id="buttonArray">
</div>

<script type="text/javascript">
	var settings = {
			'new':{'url':'/commandClass/new'},
			'newVer':{'url':'/commandClass/newVersion'},
			'addGrp':{'url':'/commandClass/addGrp'},
			'abc':{'url':'/commandClass/grammar'},
			'cancel':{'url':'/commandClass/cancel'},
			'save':{'url':'/commandClass/save','callback':saveCallback},
			'accept':{'url':'/commandClass/accept'},			
			'decline':{'url':'/commandClass/decline'},
			'propose':{'url':'/commandClass/propose'},
			'delete':{'url':'/commandClass/delete'}
	};
	
	function newVCallback(data){
		fillData(data);
		newVerMode();
	}
	
	function newVerMode(){
		createMode();
		$(".NewVer").each(function(){
			if($(this).attr("class").indexOf("read") != -1){
				$(this).show();
			}else{
				$(this).hide();
			}
		})
	}
	
	function saveCallback(data){
		window.location.href = "/commandClass/" + data.myHashMap.id;
	}
	
	function configuraBtn(buttons){
		$("#buttons").loadButtons(buttons,settings);
	}
</script>